﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
 <!--  start step-holder -->
    <div id="step-holder">
        <div class="step-no">
            1</div>
        <div class="step-dark-left">
            Static Block Details</div>
        <div class="step-dark-Round">
            &nbsp;</div>
        <div class="clear">
        </div>
    </div>
    <!--  end step-holder -->
    <!-- start id-form -->
    <form action="staticblock/add" class="validateforms" method="post">
    <table border="0" cellpadding="0" cellspacing="0" id="id-form">
        <tr>
            <th valign="top">
                <span class="mandate">*</span>Title:
            </th>
            <td>
                <input type="text" name="title" id="title" class="validate[required] inp-form" />
            </td>
            <td>
                <label class="error" for="title">
                    <div class="error-left">
                    </div>
                    <div class="error-inner">
                        This field is required.</div>
                </label>
            </td>
        </tr>
        <tr>
            <th valign="top">
                <span class="mandate">*</span>Slug:
            </th>
            <td>
                <input type="text" name="slug" id="slug" class="validate[required] inp-form" />
            </td>
            <td>
                <label class="error" for="slug">
                    <div class="error-left">
                    </div>
                    <div class="error-inner">
                        This field is required.</div>
                </label>
            </td>
        </tr>
        <tr>
            <th valign="top">
                <span class="mandate">*</span> Status:
            </th>
            <td>
                <div class="select_holder">
                    <select class="styledselect_form_1" id="status" name="status">
                        <option value="1">Active</option>
                        <option value="0">Inactive</option>
                    </select>
                </div>
            </td>
            <td>
                <label class="error" for="saleorrent">
                    <div class="error-left">
                    </div>
                    <div class="error-inner">
                        This field is required.</div>
                </label>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <div class="form_divider">
                </div>
            </td>
            <!--------------------------------------------------------------------->
        </tr>
        <tr>
            <th valign="top">
                <span class="mandate">*</span> Block Content:
            </th>
            <td style="width: 600px;">
            <input type="text" id="block_content_validate" class="validate[required] " style="visibility:hidden;height:0 !important;"/>
                <textarea rows="" cols="" name="block_content" id="block_content" class="ckeditors"></textarea>
            </td>
            <td>
                <label class="error" for="block_content">
                    <div class="error-left">
                    </div>
                    <div class="error-inner">
                        This field is required.</div>
                </label>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                &nbsp;
            </td>
        </tr>
        <tr>
            <th>
                &nbsp;
            </th>
            <td valign="top">
                <input type="submit" value="" class="form-submit" onclick="checkForm();" />
                <input type="reset" value="" class="form-reset" />
            </td>
            <td>
            </td>
        </tr>
    </table>
    </form>
    <!-- end id-form  -->

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
 <!-- CK Editor Code & CKFInder-->

<!-- CSS -->
<link href="<%=Url.Content("~/Content/css/validationEngine.jquery.css")%>" rel="stylesheet" type="text/css" />
<link href="<%=Url.Content("~/Content/css/validationEngine.jquery.css")%>" rel="stylesheet" type="text/css" />
 <script type="text/javascript" src="<%=Url.Content("~/Scripts/jquery.js")%>"></script>
   <script type="text/javascript" src="<%=Url.Content("~/Scripts/superfish/hoverIntent.js")%>"></script>  
    <script type="text/javascript" src="<%=Url.Content("~/Scripts/Validation/languages/jquery.validationEngine-en.js")%>"></script> 
       <script type="text/javascript" src="<%=Url.Content("~/Scripts/Validation/jquery.validationEngine.js")%>"></script>   
       <script type="text/javascript" src="<%=Url.Content("~/Scripts/jquery.stringToSlug.min.js")%>"></script>   
    
    <script type="text/javascript" src="<%=Url.Content("~/Scripts/ckeditor/ckeditor.js")%>"></script>
    <script type="text/javascript" src="<%=Url.Content("~/Scripts/ckeditor/adapters/jquery.js")%>"></script>

    <script type="text/javascript">
        function checkForm() {
            $(document).ready(function() {

                if ($('#block_content').val().length > 3) {
                    $('#block_content_validate').val('ok');
                }
                else {
                    $('#block_content_validate').val('');
                }

            });


        }
        $(document).ready(function() {

            jQuery(".validateforms").validationEngine();
            var config = {
                language: 'en-gb',
                scayt_autoStartup: true,
                toolbar:
					[
						['Print', 'Templates', 'Bold', 'Italic', 'Underline', 'TextColor', 'Table', 'SpecialChar', '-', 'NumberedList', 'BulletedList', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
						['Cut', 'Copy', 'Off', 'PasteText', 'PasteFromWord', 'Link', 'Unlink'], ['Undo', 'Redo', '-', 'SelectAll'],
					    ['Font', 'FontSize']
					],
                coreStyles_bold: { element: 'b', overrides: 'strong' }
       
            }
            $('textarea.ckeditors').ckeditor(config);
        
          


            //auto generate slug
            $("#title").stringToSlug({
                setEvents: 'keyup keydown blur',
                getPut: '#slug',
                space: '-'
            });



        });

	

    </script>
</asp:Content>
